#

include         ../../../dist/dev/include/apmmodule/Makefile_comm.mk

CFLAGS          =
CFLAGS          += $(CFLAGS_EXT)

LIBS            = $(LIB_A_APM_SHM) $(LIB_A_APM_COMM) -lgthread-2.0 -lzlog -ljson-c
LIBS            += $(LIBS_EXT)

INCLUDES = -I. -I$(LIB_I_APM_COMM) -I$(LIB_I_APM_SHM)

TARGET_INIT        := apmshm_init
TARGET_EXIT        := apmshm_exit

all: clean $(TARGET_INIT) $(TARGET_EXIT)

$(TARGET_INIT):
	$(CX) -o $@ $(CFLAGS) frshm_init_main.c $(INCLUDES) $(LIBS)

$(TARGET_EXIT):
	$(CX) -o $@ $(CFLAGS) frshm_exit_main.c $(INCLUDES) $(LIBS)

install:
	rm -f $(COMM_DIST_DIR_BIN)/$(TARGET_INIT) $(COMM_DIST_DIR_BIN)/$(TARGET_EXIT); mkdir -p  $(COMM_DIST_DIR_BIN);
	cp $(TARGET_INIT) $(COMM_DIST_DIR_BIN)/.;cp $(TARGET_EXIT) $(COMM_DIST_DIR_BIN)/.;

uninstall:
	rm -f $(COMM_DIST_DIR_BIN)/$(TARGET_INIT) $(COMM_DIST_DIR_BIN)/$(TARGET_EXIT)

clean:
	rm -f *.o $(TARGET_INIT) $(TARGET_EXIT) *~

# EOF
